step clone(type: 'greenmoonsoftware.tidewater.plugins.git.GitClone') {
    url 'git@github.com:greathouse/tidewater.git'
    dir 'tidewater'
}

step build(type: 'greenmoonsoftware.tidewater.plugins.gradle.Gradle') {
    workingDir clone.dir
    tasks 'installGulp npmInstall build'
}

step copyArtifact(type: 'greenmoonsoftware.tidewater.plugins.shell.Shell') {
    env ([
        toArtifactDir: "${context.workspace}/artifacts",
        artifact: "${context.workspace}/${clone.dir}/web/build/libs/web.jar"
    ])
    contents '''\
        mkdir -p $toArtifactDir
        cp $artifact $toArtifactDir
        ls -lah $toArtifactDir
    '''.stripIndent()
}